[IA64] Misc clean-up and warnings removal.
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 28 Feb 2006 20:10:16 +0000 (13:10 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 28 Feb 2006 20:10:16 +0000 (13:10 -0700)
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
xen/arch/ia64/xen/irq.c
xen/arch/ia64/xen/privop.c
xen/arch/ia64/xen/process.c
xen/include/asm-ia64/debugger.h
xen/include/asm-ia64/linux-xen/asm/tlbflush.h
xen/include/asm-ia64/privop.h
xen/include/asm-ia64/xensystem.h

index 3e5e2ced0823972ed5d8025cf377e0655345327e..4ccd8a737ac142318a63abfc3e766b5c59f94da5 100644 (file)
@@ -129,7 +129,9 @@ unsigned int __ia64_local_vector_to_irq (ia64_vector vec)
 }
 #endif
 
+#ifndef XEN
 static void register_irq_proc (unsigned int irq);
+#endif
 
 /*
  * Special irq handlers.
@@ -1492,6 +1494,7 @@ extern void domain_pend_keyboard_interrupt(int irq);
 irqreturn_t guest_forward_keyboard_input(int irq, void *nada, struct pt_regs *regs)
 {
        domain_pend_keyboard_interrupt(irq);
+       return 0;
 }
 
 void serial_input_init(void)
index 6e76a60a980c7e0b0bb316718bd754465851a120..411bab859e3224a15cc8d1bebefe018ece22038e 100644 (file)
@@ -529,7 +529,7 @@ IA64FAULT priv_mov_from_psr(VCPU *vcpu, INST64 inst)
 Privileged operation decode and dispatch routines
 **************************************************************************/
 
-IA64_SLOT_TYPE slot_types[0x20][3] = {
+static const IA64_SLOT_TYPE slot_types[0x20][3] = {
        {M, I, I}, {M, I, I}, {M, I, I}, {M, I, I},
        {M, I, ILLEGAL}, {M, I, ILLEGAL},
        {ILLEGAL, ILLEGAL, ILLEGAL}, {ILLEGAL, ILLEGAL, ILLEGAL},
@@ -549,7 +549,7 @@ IA64_SLOT_TYPE slot_types[0x20][3] = {
 // pointer to privileged emulation function
 typedef IA64FAULT (*PPEFCN)(VCPU *vcpu, INST64 inst);
 
-PPEFCN Mpriv_funcs[64] = {
+static const PPEFCN Mpriv_funcs[64] = {
   priv_mov_to_rr, priv_mov_to_dbr, priv_mov_to_ibr, priv_mov_to_pkr,
   priv_mov_to_pmc, priv_mov_to_pmd, 0, 0,
   0, priv_ptc_l, priv_ptc_g, priv_ptc_ga,
@@ -799,7 +799,7 @@ priv_emulate(VCPU *vcpu, REGS *regs, UINT64 isr)
 #define HYPERPRIVOP_SET_KR             0x12
 #define HYPERPRIVOP_MAX                        0x12
 
-char *hyperpriv_str[HYPERPRIVOP_MAX+1] = {
+static const char * const hyperpriv_str[HYPERPRIVOP_MAX+1] = {
        0, "rfi", "rsm.dt", "ssm.dt", "cover", "itc.d", "itc.i", "ssm.i",
        "=ivr", "=tpr", "tpr=", "eoi", "itm=", "thash", "ptc.ga", "itr.d",
        "=rr", "rr=", "kr="
@@ -898,7 +898,7 @@ ia64_hyperprivop(unsigned long iim, REGS *regs)
 Privileged operation instrumentation routines
 **************************************************************************/
 
-char *Mpriv_str[64] = {
+static const char * const Mpriv_str[64] = {
   "mov_to_rr", "mov_to_dbr", "mov_to_ibr", "mov_to_pkr",
   "mov_to_pmc", "mov_to_pmd", "<0x06>", "<0x07>",
   "<0x08>", "ptc_l", "ptc_g", "ptc_ga",
@@ -918,7 +918,7 @@ char *Mpriv_str[64] = {
 };
 
 #define RS "Rsvd"
-char *cr_str[128] = {
+static const char * const cr_str[128] = {
   "dcr","itm","iva",RS,RS,RS,RS,RS,
   "pta",RS,RS,RS,RS,RS,RS,RS,
   "ipsr","isr",RS,"iip","ifa","itir","iipa","ifs",
index ee88991543c3b4a3deda391f8ce2b58e0dea0fd3..e1f10ce49a43e7d32341c097c8654c3fd81e8a22 100644 (file)
@@ -228,14 +228,12 @@ unsigned long pending_false_positive = 0;
 
 void reflect_extint(struct pt_regs *regs)
 {
-//     extern unsigned long vcpu_verbose, privop_trace;
        unsigned long isr = regs->cr_ipsr & IA64_PSR_RI;
        struct vcpu *v = current;
        static int first_extint = 1;
 
        if (first_extint) {
                printf("Delivering first extint to domain: isr=0x%lx, iip=0x%lx\n", isr, regs->cr_iip);
-               //privop_trace = 1; vcpu_verbose = 1;
                first_extint = 0;
        }
        if (vcpu_timer_pending_early(v))
@@ -339,12 +337,8 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa,
 {
        struct pt_regs *regs = (struct pt_regs *) &stack;
        unsigned long code;
-#if 0
-       unsigned long error = isr;
-       int result, sig;
-#endif
        char buf[128];
-       static const char *reason[] = {
+       static const char * const reason[] = {
                "IA-64 Illegal Operation fault",
                "IA-64 Privileged Operation fault",
                "IA-64 Privileged Register fault",
@@ -708,9 +702,8 @@ void
 ia64_handle_privop (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long itir)
 {
        IA64FAULT vector;
-       struct vcpu *v = current;
 
-       vector = priv_emulate(v,regs,isr);
+       vector = priv_emulate(current,regs,isr);
        if (vector != IA64_NO_FAULT && vector != IA64_RFI_IN_PROGRESS) {
                // Note: if a path results in a vector to reflect that requires
                // iha/itir (e.g. vcpu_force_data_miss), they must be set there
@@ -764,7 +757,8 @@ ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long i
                }
 #endif
 printf("*** NaT fault... attempting to handle as privop\n");
-printf("isr=0x%lx, ifa=0x%lx, iip=0x%lx, ipsr=0x%lx\n", isr, ifa, regs->cr_iip, psr);
+printf("isr=%016lx, ifa=%016lx, iip=%016lx, ipsr=%016lx\n",
+       isr, ifa, regs->cr_iip, psr);
                //regs->eml_unat = 0;  FIXME: DO WE NEED THIS???
                // certain NaT faults are higher priority than privop faults
                vector = priv_emulate(v,regs,isr);
index 50e647520095612eed9a5d0c14d485ec4547d50f..9d59159fc6571cbe85554d124d7c13c91421ed4e 100644 (file)
@@ -40,6 +40,8 @@
 
 #include <xen/gdbstub.h>
 
+void show_registers(struct cpu_user_regs *regs);
+
 // NOTE: on xen struct pt_regs = struct cpu_user_regs
 //       see include/asm-ia64/linux-xen/asm/ptrace.h
 #ifdef CRASH_DEBUG
index a53253f8d2796ff128a206b45a4d86fbe8c1f250..38f7318f6c031af96481dc429a9f19e60ea3276b 100644 (file)
@@ -103,6 +103,10 @@ flush_tlb_pgtables (struct mm_struct *mm, unsigned long start, unsigned long end
         */
 }
 
+
 #define flush_tlb_kernel_range(start, end)     flush_tlb_all() /* XXX fix me */
+#ifdef XEN
+extern void flush_tlb_mask(cpumask_t mask);
+#endif
 
 #endif /* _ASM_IA64_TLBFLUSH_H */
index ace012263e8aee5e1baf153c93bb5111504f07a4..fc22db9ee0631d3802e361be9e99f6477ac11b7e 100644 (file)
@@ -209,4 +209,6 @@ typedef union U_INST64 {
 
 extern void privify_memory(void *start, UINT64 len);
 
+extern int ia64_hyperprivop(unsigned long iim, REGS *regs);
+
 #endif
index d204141fcb34b48efc6c0fb90586a09a59a885ce..b699454a8b26783c1d8f4ca4067359458bfb314d 100644 (file)
@@ -78,7 +78,6 @@ extern struct task_struct *vmx_ia64_switch_to (void *next_task);
 #define __cmpxchg_user(ptr, new, old, _size)                           \
 ({                                                                     \
        register long __gu_r8 asm ("r8");                               \
-       register long __gu_r9 asm ("r9");                               \
        asm volatile ("mov ar.ccv=%0;;" :: "rO"(old));                  \
        asm volatile ("mov %1=r0;;\n"                                   \
                "[1:]\tcmpxchg"_size".acq %0=[%2],%3,ar.ccv\n"          \